package news.dao;

import news.model.Link;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface LinksDao {
    List<Link> linkList(Link link);

    @Update("update links set status = #{status} where id = #{id}")
    void changeStatus(Integer id, Integer status);

    @Delete("delete from links where id = #{id}")
    void deleteLinks(Integer id);

    void save(Link link);

    Link findLinkById(Integer id);

    void update(Link link);
}
